<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Home\Controller;
use OT\DataDictionary;

/**
 * 前台首页控制器
 * 主要获取首页聚合数据
 */
class CultrueController extends HomeController
{

	//系统首页
    public function index()
    {

		$category = new \Document\Model\ContentArticle\Home\GetCultrueCategoryModel();
        $category_list = $category->get();
		
		$this->assign('category_list', $category_list);
		
		$cultrue=D('DocumentContentArticle');
		$condition['id']= $category_list[0]['id'];
		$cultrue_content=$cultrue->where($condition)->field('content')->select();

		$this->assign('cultrue_content',$cultrue_content);
        $this->display('cultrue');
    }
	
	    public function test()
    {

		$category = new \Document\Model\ContentArticle\Home\GetCultrueCategoryModel();
        $category_list = $category->get();
		
		$this->assign('category_list', $category_list);
		
		$cultrue=D('DocumentContentArticle');
		$condition['id']= $category_list[0]['id'];
		$cultrue_content=$cultrue->where($condition)->field('content')->select();

		$this->assign('cultrue_content',$cultrue_content);
        $this->display('test');
    }

}